package com.example.yan_music.model.net;

import com.example.yan_music.bean.UserInfo;
import com.example.yan_music.bean.wangyi.Banner;
import com.example.yan_music.bean.wangyi.Lyric;
import com.example.yan_music.bean.wangyi.NewSearchSong;
import com.example.yan_music.bean.wangyi.NewSongUrl;
import com.example.yan_music.bean.wangyi.RecommendSongList;
import com.example.yan_music.bean.wangyi.SongAlbum;
import com.example.yan_music.bean.wangyi.SongDetail;
import com.example.yan_music.bean.wangyi.SongListDetail;

import java.util.List;

import io.reactivex.Observable;

/**
 * APP所有有关网络操作的方法
 */
public interface NetworkAction {

    /**
     * 登录
     *
     * @param phoneNum
     * @param password
     * @return
     */
    Observable<UserInfo> login(String phoneNum, String password);

    /**
     * 搜索歌曲
     *
     * @param keywords
     * @param offset
     * @return
     */
    Observable<NewSearchSong> search(String keywords, int offset);

    /**
     * 获取歌曲的播放地址
     *
     * @param songId
     * @return
     */
    Observable<NewSongUrl> getSongPlayUrl(int songId);

    /**
     * 获取歌词
     * @param songId
     * @return
     */
    Observable<Lyric> getSongLyric(int songId);

    /**
     * 获取专辑
     * 获取歌曲封面
     * @param songId
     * @return
     */
    Observable<SongAlbum> getSongAlbum(int songId);

    /**
     * 获取轮播图
     * @return
     */
    Observable<Banner> getBanner();

    /**
     * 获取推荐歌单
     * @param limit     一次获取多少个
     * @return
     */
    Observable<RecommendSongList> getRecommendSongList(int limit);

    /**
     * 获取歌单详情
     *
     * @param songListId
     * @return
     */
    Observable<SongListDetail> getPlayListDetail(long songListId);

    /**
     * 获取歌曲详情
     *
     * @param ids
     * @return
     */
    Observable<SongDetail> getSongDetail(String ids);
}
